# -*- coding: utf-8 -*-

from django import forms
from servsocial.models import Compromisso, StatusCompromisso
from djtools.formfields import BrHoraField, BrDataField
from djtools.formwidgets import BrDataWidget, BrTimeWidget
from django.utils.datetime_safe import datetime
from django.contrib.auth.models import User

        
class CompromissoForm(forms.ModelForm): 
    
    class Meta:
        model = Compromisso
    
#    usuario = forms.ModelChoiceField(label=u'Usuário', widget=forms.Select(), queryset=User.objects.all(), required=False)
    data = BrDataField(label=u'Data', widget=BrDataWidget(), initial=datetime.now())
    hora = BrHoraField(label=u'Hora', widget=BrTimeWidget())
    status = forms.ModelChoiceField(label=u'Situação', widget=forms.Select(), queryset=StatusCompromisso.objects.all(), initial=2)
#    import pdb; pdb.set_trace()